#pragma once
#include <string>
#include <map>
#include "MMemory.h"
#include "MValue.h"
#include "InnerMTypes.h"

BEGIN_MARIONETTE
namespace MList_Helper{
	class MList_Iterator:public MStruct
	{
	public:
		MList_Iterator(MEnviroment* pEnv);
		MType* PointerType();
		void SetValueType(MString typeName);
		MString GetValueTypeName();
		virtual MValue Next(MValue* v);
		virtual MValue Prev(MValue* v);
		virtual MValue Value(MValue* v);
	private:
		MPointer m_NodePointerType;
	};
};
class MList:public MStruct{
public:
	MList(MString name ,MEnviroment* pEnv);
	virtual MString ToXML();
	virtual void Import(MString xml);
	virtual MValue Begin(MValue* v);
	virtual MValue End(MValue* v);
	virtual DWORD Count(MValue* v);
private:
	MList_Helper::MList_Iterator m_NodeType;
};

END_MARIONETTE